package com.store.framework.rest;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

import com.store.framework.entry.AppPerTbl;

public class Test {
	
	
	
	public static void main(String[] args) throws IOException {
		
//		ITestLogic ilogic = new TestLogic();
//		ilogic.add();
		List<AppPerTbl> list = new ArrayList<AppPerTbl>();
		AppPerTbl apt =new AppPerTbl();
		apt.setId("xx");
		list.add(apt);
		list.add(apt);
		JSONArray ja = JSONArray.fromObject(list);
		System.out.println(ja.toString());
		
		
		
		String json = "[{\"perState\":\"\",\"delPer\":\"\",\"perResaddres\":\"\",\"delDate\":\"\",\"worksId\":\"\",\"perName\":\"\",\"remarks\":\"\",\"perbirthday\":\"\",\"perImgId\":\"\",\"editDate\":\"\",\"perSex\":\"\",\"completeness\":\"\",\"perHomeTaddres\":\"\",\"penName\":\"\",\"ID\":\"xx\",\"addDate\":\"\",\"del\":\"\",\"schoolId\":\"\",\"editPer\":\"\",\"perConstellation\":\"\"}]";
		JSONArray jas = JSONArray.fromObject(json);
		JSONObject jo = (JSONObject)jas.get(0);
		System.out.println(jo.get("ID"));
		
		
		
		
	}
}
